<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<style type="text/css">
			*{
				margin: 0;
				padding: 0;
			}
			#wrap{
				width: 100px;
				height: 100px;
				padding: 100px;
				border: 1px solid;
				margin: 100px auto;
				perspective: 200px;
			}
			#wrap:hover #box{
				/*transform: rotate3d(1,1,1,360deg);*/
				transform: rotateX(360deg);
			}
			#box{
				position: relative;
				width: 100px;
				height: 100px;
				background: deeppink;
				transition: 2s;
				transform-style: preserve-3d;
				transform-origin: center center -50px; 
			}
			#box div{
				position: absolute;
				width: 100px;
				height: 100px;
				line-height: 100px;
				text-align: center;
				font-size: 50px;
				background: pink;
			}
			#box div:nth-of-type(1){
				top:-100px;
				transform-origin: bottom;
				transform: rotateX(90deg);
			}
			#box div:nth-of-type(2){
				left:-100px;
				transform-origin: right;
				transform: rotateY(-90deg);
			}
			#box div:nth-of-type(3){
				bottom:-100px;
				transform-origin: top;
				transform: rotateX(-90deg);
			}
			#box div:nth-of-type(4){
				right:-100px;
				transform-origin: left;
				transform: rotateY(90deg);
			}
			#box div:nth-of-type(5){
				transform: translateZ(-100px) rotateX(180deg);
			}
		</style>
	</head>
	<body>
		<div id="wrap">
			<div id="box">
				<div>1</div>
				<div>2</div>
				<div>3</div>
				<div>4</div>
				<div>5</div>
				<div>6</div>
			</div>
		</div>
	</body>
</html>
